package oldFiles;
import lejos.nxt.*;
import lejos.nxt.addon.*;

 public class CompassTest {
	
	public static void main(String[] args) throws Exception {
		CompassSensor compass = new CompassSensor(SensorPort.S2);
		
		compass.startCalibration();
		Thread.sleep(1000);
		compass.stopCalibration();
		while(!Button.ESCAPE.isPressed()) {
			LCD.clear();
			//compass.
			LCD.drawInt((int) compass.getDegrees(), 0, 0);
			LCD.refresh();
			Thread.sleep(500);
		}
	}
}
